package cn.gailvlun.gll.presentation.emotion.bean;

import java.util.HashMap;
import java.util.Map;

import cn.gailvlun.gll.net.NewQueryParam;
import cn.gailvlun.gll.net.QueryParam;
import cn.gailvlun.gll.net.emotion.CommentReplyReq;
import cn.gailvlun.gll.net.emotion.Emotion;



public class EmotionDetail {
    private EmotionDetailTransfer transfer;
    private NewQueryParam mQueryParam;
    private Emotion emotion;
    private CommentReplyReq req;
    private Map<Integer, String> replyCache;
    private Order order = Order.CREATED;

    public EmotionDetail(EmotionDetailTransfer transfer) {
        this.transfer = transfer;
        mQueryParam = new NewQueryParam();
    }

    public EmotionDetailTransfer getTransfer() {
        return transfer;
    }

    public void setTransfer(EmotionDetailTransfer transfer) {
        this.transfer = transfer;
    }

    public NewQueryParam getQueryParam() {
        return mQueryParam;
    }

    public void setQueryParam(NewQueryParam queryParam) {
        mQueryParam = queryParam;
    }

    public Emotion getEmotion() {
        return emotion;
    }

    public void setEmotion(Emotion emotion) {
        this.emotion = emotion;
    }

    public CommentReplyReq getReq() {
        if (req == null) req = new CommentReplyReq();
        return req;
    }

    public void setReq(CommentReplyReq req) {
        this.req = req;
    }

    public Map<Integer, String> getReplyCache() {
        if (replyCache == null) replyCache = new HashMap<>();
        return replyCache;
    }

    public void setReplyCache(Map<Integer, String> replyCache) {
        this.replyCache = replyCache;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }

    public enum Order {
        CREATED("-created"), HEART_LEN("-heart_len");
        private String desc;

        Order(String desc) {
            this.desc = desc;
        }

        public String getDesc() {
            return desc;
        }
    }
}
